<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.lang.reflect.*" %>
<%@ page import="jakarta.servlet.http.HttpServletRequest" %>
<html>
<head>
    <title>pageContext内置对象</title>
</head>
<body>
<h1>沐言科技：www.yootk.com</h1>
<%
    Method method = pageContext.getRequest().getClass().getMethod("getMethod"); // 反射获取调用方法
%>
<h1>请求模式：<%=method.invoke(pageContext.getRequest())%></h1>

<%
    HttpServletRequest req = (HttpServletRequest) pageContext.getRequest();
%>
<h1>请求模式：<%=req.getMethod()%></h1>
</body>
</html>
